package com.hh.workorder.entity;

import java.io.Serializable;
//定义 user_roles 表的复合主键
public class UserRolesPK implements Serializable {

    private int userId;
    private int roleId;

    // Getters and Setters
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserRolesPK that = (UserRolesPK) o;
        return userId == that.userId && roleId == that.roleId;
    }

    @Override
    public int hashCode() {
        return 31 * userId + roleId;
    }
}